package top.krwlc.server.service;

/**
 * krwlc
 * top.krwlc.server.service
 *
 * @author Lanscarlos
 * @since 2022-04-05 16:27
 */
public class ServiceResult {

    // 状态代码
    private int status;

    // 状态信息
    private String message;

    // 用于传递数据的对象
    private Object object;

    public ServiceResult(int status) {
        this.status = status;
    }

    public ServiceResult(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public ServiceResult(int status, String message, Object object) {
        this.status = status;
        this.message = message;
        this.object = object;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public static ServiceResult pass(int status) {
        return new ServiceResult(status);
    }

    public static ServiceResult pass(int status, String message) {
        return new ServiceResult(status, message);
    }

    public static ServiceResult pass(int status, String message, Object object) {
        return new ServiceResult(status, message, object);
    }

}
